home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 9414 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  2.7 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 69 78 | 2e 6e 65 74 63 6f 6d 2e |Path: ix|.netcom.|
|00000010| 63 6f 6d 21 6e 65 77 73 | 0a 46 72 6f 6d 3a 20 4e |com!news|.From: N|
|00000020| 6f 72 6d 61 6e 20 42 75 | 6c 6c 65 6e 20 3c 6e 62 |orman Bu|llen <nb|
|00000030| 75 6c 6c 65 6e 40 69 78 | 2e 6e 65 74 63 6f 6d 2e |ullen@ix|.netcom.|
|00000040| 63 6f 6d 3e 0a 4e 65 77 | 73 67 72 6f 75 70 73 3a |com>.New|sgroups:|
|00000050| 20 63 6f 6d 70 2e 6c 61 | 6e 67 2e 63 0a 53 75 62 | comp.la|ng.c.Sub|
|00000060| 6a 65 63 74 3a 20 52 65 | 3a 20 66 73 65 65 6b 28 |ject: Re|: fseek(|
|00000070| 29 20 61 6e 64 20 43 52 | 2f 4c 46 20 70 61 69 72 |) and CR|/LF pair|
|00000080| 0a 44 61 74 65 3a 20 53 | 75 6e 2c 20 31 30 20 4d |.Date: S|un, 10 M|
|00000090| 61 72 20 31 39 39 36 20 | 30 37 3a 30 31 3a 34 32 |ar 1996 |07:01:42|
|000000a0| 20 2d 30 38 30 30 0a 4f | 72 67 61 6e 69 7a 61 74 | -0800.O|rganizat|
|000000b0| 69 6f 6e 3a 20 42 6c 61 | 63 6b 20 43 61 74 20 41 |ion: Bla|ck Cat A|
|000000c0| 73 73 6f 63 69 61 74 65 | 73 0a 4d 65 73 73 61 67 |ssociate|s.Messag|
|000000d0| 65 2d 49 44 3a 20 3c 33 | 31 34 32 45 45 44 36 2e |e-ID: <3|142EED6.|
|000000e0| 33 41 35 43 40 69 78 2e | 6e 65 74 63 6f 6d 2e 63 |3A5C@ix.|netcom.c|
|000000f0| 6f 6d 3e 0a 52 65 66 65 | 72 65 6e 63 65 73 3a 20 |om>.Refe|rences: |
|00000100| 3c 33 31 34 32 33 44 37 | 43 2e 37 38 41 35 40 69 |<31423D7|C.78A5@i|
|00000110| 78 2e 6e 65 74 63 6f 6d | 2e 63 6f 6d 3e 0a 4e 4e |x.netcom|.com>.NN|
|00000120| 54 50 2d 50 6f 73 74 69 | 6e 67 2d 48 6f 73 74 3a |TP-Posti|ng-Host:|
|00000130| 20 70 6c 65 2d 63 61 39 | 2d 30 35 2e 69 78 2e 6e | ple-ca9|-05.ix.n|
|00000140| 65 74 63 6f 6d 2e 63 6f | 6d 0a 4d 69 6d 65 2d 56 |etcom.co|m.Mime-V|
|00000150| 65 72 73 69 6f 6e 3a 20 | 31 2e 30 0a 43 6f 6e 74 |ersion: |1.0.Cont|
|00000160| 65 6e 74 2d 54 79 70 65 | 3a 20 74 65 78 74 2f 70 |ent-Type|: text/p|
|00000170| 6c 61 69 6e 3b 20 63 68 | 61 72 73 65 74 3d 75 73 |lain; ch|arset=us|
|00000180| 2d 61 73 63 69 69 0a 43 | 6f 6e 74 65 6e 74 2d 54 |-ascii.C|ontent-T|
|00000190| 72 61 6e 73 66 65 72 2d | 45 6e 63 6f 64 69 6e 67 |ransfer-|Encoding|
|000001a0| 3a 20 37 62 69 74 0a 58 | 2d 4e 45 54 43 4f 4d 2d |: 7bit.X|-NETCOM-|
|000001b0| 44 61 74 65 3a 20 53 75 | 6e 20 4d 61 72 20 31 30 |Date: Su|n Mar 10|
|000001c0| 20 20 39 3a 30 32 3a 32 | 32 20 41 4d 20 43 53 54 | 9:02:2|2 AM CST|
|000001d0| 20 31 39 39 36 0a 58 2d | 4d 61 69 6c 65 72 3a 20 | 1996.X-|Mailer: |
|000001e0| 4d 6f 7a 69 6c 6c 61 20 | 32 2e 30 20 28 57 69 6e |Mozilla |2.0 (Win|
|000001f0| 31 36 3b 20 49 29 0a 54 | 6f 3a 20 48 65 6e 72 79 |16; I).T|o: Henry|
|00000200| 20 43 72 6f 73 73 20 3c | 68 63 72 6f 73 73 40 69 | Cross <|hcross@i|
|00000210| 78 2e 6e 65 74 63 6f 6d | 2e 63 6f 6d 3e 0a 0a 48 |x.netcom|.com>..H|
|00000220| 65 6e 72 79 20 43 72 6f | 73 73 20 77 72 6f 74 65 |enry Cro|ss wrote|
|00000230| 3a 0a 3e 20 0a 3e 20 48 | 69 20 62 6f 79 73 20 61 |:.> .> H|i boys a|
|00000240| 6e 64 20 67 69 72 6c 73 | 21 0a 3e 20 20 20 20 49 |nd girls|!.> I|
|00000250| 20 67 6f 74 20 70 72 6f | 62 6c 65 6d 73 20 72 69 | got pro|blems ri|
|00000260| 67 68 74 20 68 65 72 65 | 20 69 6e 20 72 69 76 65 |ght here| in rive|
|00000270| 72 20 63 69 74 79 21 20 | 53 65 65 6d 73 20 6d 79 |r city! |Seems my|
|00000280| 20 31 36 2d 62 69 74 20 | 4d 53 44 4f 53 0a 3e 20 | 16-bit |MSDOS.> |
|00000290| 70 72 6f 67 72 61 6d 20 | 75 73 69 6e 67 20 4d 53 |program |using MS|
|000002a0| 56 43 20 31 2e 35 32 20 | 69 73 20 63 61 75 73 69 |VC 1.52 |is causi|
|000002b0| 6e 67 20 6d 65 20 73 6f | 6d 65 20 63 6f 6e 73 74 |ng me so|me const|
|000002c0| 65 72 6e 61 74 69 6f 6e | 2e 20 49 20 68 61 76 65 |ernation|. I have|
|000002d0| 0a 3e 20 61 20 41 53 43 | 49 49 20 64 61 74 61 20 |.> a ASC|II data |
|000002e0| 66 69 6c 65 20 49 20 6d | 75 73 74 20 72 65 61 64 |file I m|ust read|
|000002f0| 20 69 6e 20 69 6e 20 38 | 30 20 62 79 74 65 20 72 | in in 8|0 byte r|
|00000300| 65 63 6f 72 64 73 2e 20 | 53 6f 6d 65 74 69 6d 65 |ecords. |Sometime|
|00000310| 73 20 74 68 65 0a 3e 20 | 66 69 6c 65 20 77 69 6c |s the.> |file wil|
|00000320| 6c 20 68 61 76 65 20 74 | 68 65 20 43 52 2f 4c 46 |l have t|he CR/LF|
|00000330| 20 70 61 69 72 20 65 76 | 65 72 79 20 38 30 74 68 | pair ev|ery 80th|
|00000340| 20 63 68 61 72 61 63 74 | 65 72 2c 20 73 6f 6d 65 | charact|er, some|
|00000350| 74 69 6d 65 73 20 6e 6f | 74 2e 0a 3e 20 28 69 2e |times no|t..> (i.|
|00000360| 65 2e 20 73 6f 6d 65 74 | 69 6d 65 73 20 69 74 73 |e. somet|imes its|
|00000370| 20 61 20 74 65 78 74 20 | 66 69 6c 65 2c 20 73 6f | a text |file, so|
|00000380| 6d 65 74 69 6d 65 73 20 | 69 74 73 20 61 20 62 69 |metimes |its a bi|
|00000390| 6e 61 72 79 20 66 69 6c | 65 2e 29 0a 3e 20 0a 3e |nary fil|e.).> .>|
|000003a0| 20 20 20 49 27 76 65 20 | 6f 70 65 6e 65 64 20 74 | I've |opened t|
|000003b0| 68 65 20 66 69 6c 65 20 | 75 73 69 6e 67 20 66 6f |he file |using fo|
|000003c0| 70 65 6e 28 66 69 6c 65 | 6e 61 6d 65 2c 20 22 72 |pen(file|name, "r|
|000003d0| 62 22 29 20 61 6e 64 20 | 61 6d 20 67 65 74 74 69 |b") and |am getti|
|000003e0| 6e 67 20 61 6e 0a 3e 20 | 65 72 72 6f 6e 65 6f 75 |ng an.> |erroneou|
|000003f0| 73 20 70 6f 73 69 74 69 | 6f 6e 20 61 66 74 65 72 |s positi|on after|
|00000400| 20 63 65 72 74 61 69 6e | 20 20 66 73 65 65 6b 27 | certain| fseek'|
|00000410| 73 28 66 70 74 72 2c 20 | 2d 38 30 4c 2c 20 53 45 |s(fptr, |-80L, SE|
|00000420| 45 4b 5f 43 55 52 29 3b | 0a 3e 20 28 69 2e 65 2e |EK_CUR);|.> (i.e.|
|00000430| 20 49 20 72 65 61 64 20 | 61 6e 20 38 30 20 62 79 | I read |an 80 by|
|00000440| 74 65 20 72 65 63 6f 72 | 64 20 74 68 65 6e 20 72 |te recor|d then r|
|00000450| 65 61 64 20 31 20 62 79 | 74 65 20 74 6f 20 64 65 |ead 1 by|te to de|
|00000460| 74 65 72 6d 69 6e 65 20 | 69 66 0a 3e 20 20 43 52 |termine |if.> CR|
|00000470| 20 6f 72 20 4c 46 20 69 | 66 20 59 45 53 20 74 68 | or LF i|f YES th|
|00000480| 65 6e 20 72 65 61 64 20 | 61 6e 6f 74 68 65 72 20 |en read |another |
|00000490| 62 79 74 65 20 75 6e 74 | 69 6c 20 21 3d 20 43 52 |byte unt|il != CR|
|000004a0| 2f 4c 46 20 70 61 69 72 | 20 74 68 65 6e 0a 3e 20 |/LF pair| then.> |
|000004b0| 20 66 73 65 65 6b 20 2d | 31 4c 20 61 6e 64 20 72 | fseek -|1L and r|
|000004c0| 65 61 64 20 38 30 20 62 | 79 74 65 73 20 74 6f 20 |ead 80 b|ytes to |
|000004d0| 64 65 74 65 72 6d 69 6e | 65 20 69 66 20 74 68 69 |determin|e if thi|
|000004e0| 73 20 72 65 63 6f 72 64 | 20 62 65 6c 6f 6e 67 73 |s record| belongs|
|000004f0| 0a 3e 20 20 77 69 74 68 | 20 74 68 65 20 70 72 65 |.> with| the pre|
|00000500| 76 69 6f 75 73 20 64 61 | 74 61 20 69 66 20 6e 6f |vious da|ta if no|
|00000510| 74 20 74 68 65 6e 20 66 | 73 65 65 6b 28 66 70 74 |t then f|seek(fpt|
|00000520| 72 2c 20 2d 38 30 4c 2c | 20 53 45 45 4b 5f 43 55 |r, -80L,| SEEK_CU|
|00000530| 52 29 0a 3e 20 20 70 72 | 6f 63 65 73 73 20 74 68 |R).> pr|ocess th|
|00000540| 65 20 63 75 72 72 65 6e | 74 20 64 61 74 61 20 74 |e curren|t data t|
|00000550| 68 65 6e 20 72 65 74 75 | 72 6e 20 74 6f 20 72 65 |hen retu|rn to re|
|00000560| 61 64 69 6e 67 20 38 30 | 20 62 79 74 65 73 2c 20 |ading 80| bytes, |
|00000570| 65 74 63 2e 29 0a 3e 20 | 0a 3e 20 20 4d 79 20 70 |etc.).> |.> My p|
|00000580| 72 6f 62 6c 65 6d 20 69 | 73 20 74 68 61 74 20 61 |roblem i|s that a|
|00000590| 66 74 65 72 20 63 65 72 | 74 61 69 6e 20 66 73 65 |fter cer|tain fse|
|000005a0| 65 6b 73 20 2d 38 30 4c | 20 77 68 65 72 65 20 49 |eks -80L| where I|
|000005b0| 20 68 61 76 65 20 74 6f | 20 62 61 63 6b 0a 3e 20 | have to| back.> |
|000005c0| 6f 76 65 72 20 74 68 65 | 20 64 65 66 61 75 6c 74 |over the| default|
|000005d0| 20 35 31 32 20 62 79 74 | 65 20 62 75 66 66 65 72 | 512 byt|e buffer|
|000005e0| 20 62 6f 75 6e 64 61 72 | 79 20 74 68 65 20 66 69 | boundar|y the fi|
|000005f0| 6c 65 20 70 6f 69 6e 74 | 65 72 20 69 73 20 61 74 |le point|er is at|
|00000600| 20 74 68 65 0a 3e 20 77 | 72 6f 6e 67 20 70 6f 73 | the.> w|rong pos|
|00000610| 69 74 69 6f 6e 21 20 43 | 61 75 73 65 64 20 62 79 |ition! C|aused by|
|00000620| 20 74 68 65 20 43 52 2f | 4c 46 20 70 61 69 72 20 | the CR/|LF pair |
|00000630| 61 6e 64 20 6d 79 20 66 | 73 65 65 6b 27 69 6e 67 |and my f|seek'ing|
|00000640| 20 62 61 63 6b 77 61 72 | 64 73 0a 3e 20 6f 76 65 | backwar|ds.> ove|
|00000650| 72 20 61 20 35 31 32 20 | 62 79 74 65 20 62 75 66 |r a 512 |byte buf|
|00000660| 66 65 72 20 62 6f 75 6e | 64 61 72 79 20 65 76 65 |fer boun|dary eve|
|00000670| 6e 20 74 68 6f 75 67 68 | 20 49 27 6d 20 75 73 69 |n though| I'm usi|
|00000680| 6e 67 20 62 69 6e 61 72 | 79 20 6d 6f 64 65 21 0a |ng binar|y mode!.|
|00000690| 3e 20 66 73 65 65 6b 20 | 2d 38 30 4c 27 73 20 74 |> fseek |-80L's t|
|000006a0| 68 61 74 20 61 72 65 20 | 77 69 74 68 69 6e 20 74 |hat are |within t|
|000006b0| 68 65 20 35 31 32 20 62 | 79 74 65 20 62 75 66 66 |he 512 b|yte buff|
|000006c0| 65 72 20 77 6f 72 6b 20 | 66 69 6e 65 2e 20 4a 75 |er work |fine. Ju|
|000006d0| 73 74 20 64 6f 6e 27 74 | 0a 3e 20 62 61 63 6b 75 |st don't|.> backu|
|000006e0| 70 20 70 61 73 74 20 69 | 74 21 20 20 49 20 63 61 |p past i|t! I ca|
|000006f0| 6e 6e 6f 74 20 63 72 65 | 61 74 65 20 61 20 62 75 |nnot cre|ate a bu|
|00000700| 66 66 65 72 20 6c 61 72 | 67 65 20 65 6e 6f 75 67 |ffer lar|ge enoug|
|00000710| 68 20 77 69 74 68 20 6d | 61 6c 6c 6f 63 20 61 6e |h with m|alloc an|
|00000720| 64 0a 3e 20 73 65 74 76 | 62 75 66 28 29 20 74 6f |d.> setv|buf() to|
|00000730| 20 72 65 61 64 20 69 6e | 20 74 68 65 20 6c 61 72 | read in| the lar|
|00000740| 67 65 73 74 20 70 6f 73 | 73 69 62 6c 65 20 66 69 |gest pos|sible fi|
|00000750| 6c 65 2e 20 28 48 65 79 | 21 20 57 65 27 72 65 20 |le. (Hey|! We're |
|00000760| 74 61 6c 6b 69 6e 67 0a | 3e 20 31 36 20 62 69 74 |talking.|> 16 bit|
|00000770| 73 20 68 65 72 65 21 20 | 59 6f 75 20 67 75 79 73 |s here! |You guys|
|00000780| 20 72 65 6d 65 6d 62 65 | 72 20 74 68 65 20 6f 6c | remembe|r the ol|
|00000790| 64 20 36 34 4b 20 62 6f | 75 6e 64 61 72 79 20 50 |d 64K bo|undary P|
|000007a0| 49 54 41 20 72 69 67 68 | 74 3f 20 3a 29 20 29 0a |ITA righ|t? :) ).|
|000007b0| 3e 20 0a 3e 20 20 49 20 | 6b 6e 6f 77 20 74 68 69 |> .> I |know thi|
|000007c0| 73 20 63 61 6e 20 68 61 | 70 70 65 6e 20 69 6e 20 |s can ha|ppen in |
|000007d0| 74 65 78 74 20 6d 6f 64 | 65 20 62 75 74 20 49 20 |text mod|e but I |
|000007e0| 66 6f 70 65 6e 27 65 64 | 20 74 68 65 20 66 69 6c |fopen'ed| the fil|
|000007f0| 65 20 69 6e 20 6d 61 69 | 6e 28 29 0a 3e 20 61 73 |e in mai|n().> as|
|00000800| 20 22 72 62 22 21 20 20 | 50 65 72 73 6f 6e 61 6c | "rb"! |Personal|
|00000810| 6c 79 20 49 20 74 68 69 | 6e 6b 20 69 74 27 73 20 |ly I thi|nk it's |
|00000820| 61 20 6c 69 62 72 61 72 | 79 20 62 75 67 2e 20 20 |a librar|y bug. |
|00000830| 49 20 72 61 6e 20 61 63 | 72 6f 73 73 20 74 68 69 |I ran ac|ross thi|
|00000840| 73 0a 3e 20 70 72 6f 62 | 6c 65 6d 20 61 6c 6f 6e |s.> prob|lem alon|
|00000850| 67 20 74 69 6d 65 20 61 | 67 6f 20 61 6e 64 20 73 |g time a|go and s|
|00000860| 65 65 6d 20 74 6f 20 72 | 65 63 61 6c 6c 20 49 20 |eem to r|ecall I |
|00000870| 64 69 64 6e 27 74 20 68 | 61 76 65 20 74 68 69 73 |didn't h|ave this|
|00000880| 20 70 72 6f 62 6c 65 6d | 0a 3e 20 77 69 74 68 20 | problem|.> with |
|00000890| 61 20 57 61 74 63 6f 6d | 20 63 6f 6d 70 69 6c 65 |a Watcom| compile|
|000008a0| 72 2e 20 49 27 6d 20 67 | 6f 69 6e 67 20 74 6f 20 |r. I'm g|oing to |
|000008b0| 74 72 79 20 61 6e 6f 74 | 68 65 72 20 63 6f 6d 70 |try anot|her comp|
|000008c0| 69 6c 65 72 20 62 75 74 | 20 6d 79 20 70 72 6f 62 |iler but| my prob|
|000008d0| 6c 65 6d 0a 3e 20 69 73 | 20 49 27 6d 20 73 74 75 |lem.> is| I'm stu|
|000008e0| 63 6b 20 75 73 69 6e 67 | 20 4d 53 56 43 20 61 74 |ck using| MSVC at|
|000008f0| 20 74 68 69 73 20 70 6f | 69 6e 74 20 64 75 65 20 | this po|int due |
|00000900| 74 6f 20 76 65 6e 64 6f | 72 20 6c 69 62 72 61 72 |to vendo|r librar|
|00000910| 79 20 65 78 74 65 6e 73 | 69 6f 6e 73 2e 0a 3e 20 |y extens|ions..> |
|00000920| 41 6e 79 20 69 64 65 61 | 27 73 2c 20 63 6f 6d 6d |Any idea|'s, comm|
|00000930| 65 6e 74 73 20 6f 72 20 | 75 73 65 66 75 6c 20 69 |ents or |useful i|
|00000940| 6e 73 75 6c 74 27 73 20 | 77 69 6c 6c 20 62 65 20 |nsult's |will be |
|00000950| 64 6f 6c 65 66 75 6c 6c | 79 20 72 65 76 69 65 77 |dolefull|y review|
|00000960| 65 64 2e 0a 3e 20 0a 3e | 20 54 68 61 6e 78 2c 0a |ed..> .>| Thanx,.|
|00000970| 3e 20 48 2e 43 72 6f 73 | 73 20 0a 46 72 6f 6d 20 |> H.Cros|s .From |
|00000980| 74 68 65 20 77 61 79 20 | 49 20 72 65 61 64 20 77 |the way |I read w|
|00000990| 68 61 74 20 79 6f 75 27 | 72 65 20 64 6f 69 6e 67 |hat you'|re doing|
|000009a0| 2c 20 69 74 20 73 6f 75 | 6e 64 73 20 6c 69 6b 65 |, it sou|nds like|
|000009b0| 20 79 6f 75 20 6e 65 76 | 65 72 20 68 61 76 65 20 | you nev|er have |
|000009c0| 74 6f 20 0a 22 62 61 63 | 6b 73 70 61 63 65 22 20 |to ."bac|kspace" |
|000009d0| 69 6e 20 74 68 65 20 66 | 69 6c 65 20 6d 6f 72 65 |in the f|ile more|
|000009e0| 20 74 68 61 6e 20 6f 6e | 65 20 22 72 65 63 6f 72 | than on|e "recor|
|000009f0| 64 22 2c 20 77 68 65 74 | 68 65 72 20 74 68 61 74 |d", whet|her that|
|00000a00| 20 69 73 20 38 31 20 6f | 72 20 38 32 20 0a 62 79 | is 81 o|r 82 .by|
|00000a10| 74 65 73 2e 20 49 66 20 | 73 6f 2c 20 77 68 79 20 |tes. If |so, why |
|00000a20| 64 6f 6e 27 74 20 79 6f | 75 20 73 69 6d 70 6c 79 |don't yo|u simply|
|00000a30| 20 73 61 76 65 20 74 68 | 61 74 20 6f 6e 65 20 72 | save th|at one r|
|00000a40| 65 63 6f 72 64 20 69 6e | 20 6d 65 6d 6f 72 79 20 |ecord in| memory |
|00000a50| 61 6e 64 20 67 65 74 20 | 0a 69 74 20 66 72 6f 6d |and get |.it from|
|00000a60| 20 6d 65 6d 6f 72 79 20 | 69 6e 73 74 65 61 64 20 | memory |instead |
|00000a70| 6f 66 20 66 72 65 61 64 | 20 74 68 65 20 6e 65 78 |of fread| the nex|
|00000a80| 74 20 74 69 6d 65 20 79 | 6f 75 27 72 65 20 72 65 |t time y|ou're re|
|00000a90| 61 64 79 20 66 6f 72 20 | 69 6e 70 75 74 2e 0a |ady for |input.. |
+--------+-------------------------+-------------------------+--------+--------+